Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add sync APIs for "Deno.permissions" #17019

Merged
merged 30 commits into from
Jan 24, 2023
Merged

feat: Add sync APIs for "Deno.permissions" #17019

merged 30 commits into from
Jan 24, 2023

Conversation

iuioiua
Copy link
Contributor

@iuioiua iuioiua commented Dec 12, 2022

This commit adds sync versions of async APIs to "Deno.permissions"
namespace.

Following APIs were added:

  • "Deno.permissions.querySync"
  • "Deno.permissions.requestSync"
  • "Deno.permissions.revokeSync"

Closes #15576.

@iuioiua iuioiua marked this pull request as ready for review December 12, 2022 10:26
@bartlomieju
Copy link
Member

If we are to add querySync() we should probably have promptSync() and revokeSync() too

@iuioiua
Copy link
Contributor Author

iuioiua commented Dec 12, 2022

I'm happy to do so in a couple follow up PRs if you're sure 🤙🏾

@bartlomieju
Copy link
Member

I'm happy to do so in a couple follow up PRs if you're sure 🤙🏾

Great, I think they should all be added in this PR

@iuioiua iuioiua marked this pull request as draft December 13, 2022 05:10
@iuioiua iuioiua changed the title feat(permissions): Deno.permissions.querySync() feat(permissions): querySync(), revokeSync() and requestSync() Dec 13, 2022
cli/tsc/dts/lib.dom.d.ts Outdated Show resolved Hide resolved
@iuioiua iuioiua marked this pull request as ready for review December 13, 2022 06:05
@iuioiua
Copy link
Contributor Author

iuioiua commented Dec 22, 2022

#17094 is a prerequisite for this PR.

@iuioiua iuioiua marked this pull request as draft January 3, 2023 21:47
@iuioiua iuioiua closed this Jan 3, 2023
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iuioiua
Copy link
Contributor Author

iuioiua commented Jan 15, 2023

Fixing conflicts

@lino-levan
Copy link
Contributor

LGTM

* assertEquals(status.state, "granted");
* },
* });
* ```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicating all the examples and adding sync versions for these properties seems to add a bit too much noise. Maybe we should only document the async versions and remove these additions?

runtime/js/10_permissions.js Show resolved Hide resolved
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me too. Thanks @iuioiua, I'll update the commit message and land this.

@bartlomieju bartlomieju changed the title feat(permissions): querySync(), revokeSync() and requestSync() feat: Add sync APIs for "Deno.permissions" Jan 24, 2023
@bartlomieju bartlomieju merged commit 900929f into denoland:main Jan 24, 2023
@iuioiua iuioiua deleted the Deno.permissions.querySync() branch January 25, 2023 00:15
rivy added a commit to rivy-js/yargs that referenced this pull request Oct 30, 2023
…0.0+)

- `Deno.permissions.querySync()` added in Deno v1.30.0 (on 2023-01-25)
- see [suggest: Deno.permissions.querySync](denoland/deno#15576)
- see [feat: Add sync APIs for "Deno.permissions"](denoland/deno#17019)
- see [v1.30.0](https://github.com/denoland/deno/releases/tag/v1.30.0) released on 2023-01-25
rivy added a commit to rivy-js/yargs that referenced this pull request Oct 30, 2023
- `Deno.permissions.querySync()` added in Deno v1.30.0 (on 2023-01-25)
- see [suggest: Deno.permissions.querySync](denoland/deno#15576)
- see [feat: Add sync APIs for "Deno.permissions"](denoland/deno#17019)
- see [v1.30.0](https://github.com/denoland/deno/releases/tag/v1.30.0) released on 2023-01-25
rivy added a commit to rivy-js/yargs that referenced this pull request Nov 20, 2023
- `Deno.permissions.querySync()` added in Deno v1.30.0 (on 2023-01-25)
- see [suggest: Deno.permissions.querySync](denoland/deno#15576)
- see [feat: Add sync APIs for "Deno.permissions"](denoland/deno#17019)
- see [v1.30.0](https://github.com/denoland/deno/releases/tag/v1.30.0) released on 2023-01-25
rivy added a commit to rivy-js/yargs that referenced this pull request Nov 22, 2023
- `Deno.permissions.querySync()` added in Deno v1.30.0 (on 2023-01-25)
- see [suggest: Deno.permissions.querySync](denoland/deno#15576)
- see [feat: Add sync APIs for "Deno.permissions"](denoland/deno#17019)
- see [v1.30.0](https://github.com/denoland/deno/releases/tag/v1.30.0) released on 2023-01-25
rivy added a commit to rivy-js/yargs that referenced this pull request Nov 23, 2023
- `Deno.permissions.querySync()` added in Deno v1.30.0 (on 2023-01-25)
- see [suggest: Deno.permissions.querySync](denoland/deno#15576)
- see [feat: Add sync APIs for "Deno.permissions"](denoland/deno#17019)
- see [v1.30.0](https://github.com/denoland/deno/releases/tag/v1.30.0) released on 2023-01-25
rivy added a commit to rivy-js/yargs that referenced this pull request Nov 23, 2023
- `Deno.permissions.querySync()` added in Deno v1.30.0 (on 2023-01-25)
- see [suggest: Deno.permissions.querySync](denoland/deno#15576)
- see [feat: Add sync APIs for "Deno.permissions"](denoland/deno#17019)
- see [v1.30.0](https://github.com/denoland/deno/releases/tag/v1.30.0) released on 2023-01-25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

suggestion: Deno.permissions.querySync
5 participants